import 'package:app_30/res/colors.dart';
import 'package:app_30/widgets/marquee_flutter.dart';
import 'package:app_30/widgets/my_app_bar.dart';
import 'package:app_30/widgets/my_scroll_view.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class HomePage extends StatefulWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: MyAppBar(
        isBack: false,
        centerTitle: '首页',
      ),
      body: Column(
        children: [
          Row(children: [
            Padding(padding: const EdgeInsets.only(left: 16.0, right: 16.0, top: 20.0),child: Image.asset("assets/image/chat.png",fit: BoxFit.contain,))
          ],)

        ],
      ),
      //背景颜色
      backgroundColor: MaterialStateProperty.resolveWith((states) {
        //设置按下时的背景颜色
        if (states.contains(MaterialState.pressed)) {
          return Colours.dark_app_main;
        }
        //默认不使用背景颜色
        return Colours.app_main;
      }),
      //设置水波纹颜色
      overlayColor: MaterialStateProperty.all(Colours.app_main),
      //设置阴影  不适用于这里的TextButton
      elevation: MaterialStateProperty.all(0),
      //设置按钮内边距
      padding: MaterialStateProperty.all(EdgeInsets.zero),
      //设置按钮的大小
      // minimumSize: MaterialStateProperty.all(Size(double.infinity, 20)),
      //设置边框
      // side: MaterialStateProperty.all(BorderSide(color: Colors.grey, width: 1)),
      //外边框装饰 会覆盖 side 配置的样式
      // shape: MaterialStateProperty.all(StadiumBorder()),
    );
  }
}
